<template>
  <div class="B">
      <span>我是B组件(发布方)</span>
      <br>
      <button @click="sendMsg">发布信息</button>
  </div>
</template>

<script>
import Bus from "../utils/EventBus";
export default {
  name: 'BComp',
  methods: {
    sendMsg(){
      Bus.$emit("sendMsg","啊米诺斯")
    }
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .B{
    width: 300px;
    height: 300px;
    border: 2px solid black;
    padding: 10px;
  }
</style>
